<?php include '_header.php' ?>

<div id="wrapper">
    <div id="header">
        <p class="logo">
            <a href="/">Shagtv.me</a><br>
        </p>
        <div class="text"><?= $this->__('Help programmers'); ?></div>
        <ul class="locale">
            <li><a class="locale" href="/setLocale/ru"><img src="/static/images/locale-ru.gif" alt="ru"></a></li>
            <li><a class="locale" href="/setLocale/en"><img src="/static/images/locale-en.gif" alt="en"></a></li>
        </ul>
        <!--div id="search-form">
            <form>
                <input type="text" name="search" id="search" size="40" placeholder="input text here...">
                <input type="submit" value="<?= $this->__('search'); ?>">
            </form>
            <?php \Module\UserModule::authHeaderAction(); ?>
        </div-->
    </div>
    <div id="navigation">
        <ul id="ul-menu">
            <li><a href="/"><?= $this->__('Home'); ?></a></li>
            <!--li><a href="/aboutMe"><?= $this->__('About me'); ?></a></li-->
            <li><a href="/category/news"><?= $this->__('News'); ?></a></li>
            <li><a href="/category/posts"><?= $this->__('Posts'); ?></a></li>
            <li><a href="/category/videos"><?= $this->__('Videos'); ?></a></li>
            <li><a href="/utilits"><?= $this->__('Utilits'); ?></a></li>
        </ul>
    </div>
    <div id="leftcolumn">
        <?php $this->renderModule('/post/topPostsMenu'); ?>
        <?php $this->renderModule('/post/tagsMenu'); ?>
        <?php $this->renderModule('/utilsMenu'); ?>
        <?php //$this->renderModule('/user/onlineUsers'); ?>
        <div class="item">
            <div class="title">Bash.im<span class="hide">hide</span></div>
            <div class="content"><script type="text/javascript" src="http://bash.im/forweb/?u" charset="utf-8"></script></div>
        </div>
    </div>
    <div id="content">
        <div class="breadcrumbs">
            <?php 
            if($this->bc){
                $urls = array();
                foreach ($this->bc as $title => $url) {
                    $urls[] = "<a href='{$url}'>{$title}</a>";
                }
                echo implode(" | ", $urls);
            }
            ?>
        </div>
        <?= $content; ?>
    </div>
    <div id="footer">
        <p>© Shagtv.me 2012</p>
    </div>
</div>
<?php if (!\Lib\Model\UserModel::isAuth()): ?>
    <div id="login-form" class="hidden" title="Login">
        <form action="/login" method="post">
            <table>
                <tbody>
                    <tr>
                        <td><label for="username">Username:</label></td>
                        <td>
                            <input id="username" tabindex="1" size="20" autofocus="" name="username" placeholder="Username">
                        </td>
                    </tr>
                    <tr>
                        <td ><label for="password">Password:</label></td>
                        <td>
                            <input id="password" tabindex="2" size="20" type="password" name="password" placeholder="Password">
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input tabindex="9" type="submit" value="Log in">
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
    <div id="reg-form" class="hidden" title="Registration">
        <form>
            <table>
                <tbody>
                    <tr>
                        <td><label for="login">Username:</label></td>
                        <td>
                            <input id="login" tabindex="1" size="20" autofocus="" name="login" placeholder="Username">
                        </td>
                    </tr>
                    <tr>
                        <td><label for="email">Email:</label></td>
                        <td>
                            <input id="email" tabindex="1" size="20" autofocus="" name="email" placeholder="Email">
                        </td>
                    </tr>
                    <tr>
                        <td ><label for="password">Password:</label></td>
                        <td>
                            <input id="password" tabindex="2" size="20" type="password" name="password" placeholder="Password">
                        </td>
                    </tr>
                    <tr>
                        <td ><label for="confirm_password">Confirm password:</label></td>
                        <td>
                            <input id="confirm_password" tabindex="2" size="20" type="password" name="confirm_password" placeholder="Confirm password">
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <input tabindex="9" type="submit" value="Log in">
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
<?php endif; ?>
<?php include '_footer.php' ?>